﻿using System;
using System.Collections.Generic;
using System.Web.UI;
using WEATHER.Components;
using System.Web;

namespace WEATHER.Modules.MANAGEMENT.Pages
{
    public partial class ProvinceSpider : Page
    {
        protected void Page_Load(object sender, EventArgs e)
        {
            string mid = Request.QueryString["mid"];            
            Response.Write("<div style='font-family: Tahoma, Arial; font-size: 9pt'>");
            Response.Write("<strong>BẮT ĐẦU:</strong><br /><br />");
            Response.Write("Đang xử lý: .");
            Response.Flush();
            IList<WEATHER.Components.ProvinceStruct> list = WEATHER.Components.Province.GetProvinceList();
            foreach (ProvinceStruct provinceStruct in list)
            {
                WEATHER.Components.Province.GetWeatherDetailOnline(new Guid(mid), provinceStruct.Code);
                Response.Write(".");
                Response.Flush();
            }

            Response.Write("<br /><br /><strong>HOÀN THÀNH:</strong> Lúc " + DateTime.Now + ")</div>");
            Response.Flush();
        }
    }
}
